<?php if(!defined('A')) exit;?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>网站内容管理系统</title>
<?php
loadcss(array('reset','shell'));
loadcss(array('smart_pager','colorbox','glDatePicker'),P_CSS);
loadjs(array('jquery','smart_pager','jquery.colorbox'),P_JS);
loadjs(array('tab','util','table'));
?>
<script type="text/javascript">
$(document).ready(function(e) {
var smallNowTab;
var pt = new Tabs();
pt.classpre="smalltab_";
pt.container = "smalltab_container";
pt.createTab("t1","友链列表","",true,"n");
pt.init = function(){
	smallNowTab = pt.nowTab;
};
pt.onclick = function(){
	smallNowTab = pt.nowTab;
};		
pt.initTab();
pt.clickNowTab();    

$(".example1").colorbox({width:"90%", height:"600px", iframe:true, opacity:0.3});


});
$(document).ready(function(){

});
</script>
<style>
body{margin:10px;}
</style>
</head>
<body>
<table class="settop">
<tr>
<td class="settop_left">
&nbsp;&nbsp;
</td>
<td>
<div id="smalltab_container"></div>
</td>
</tr>
</table>
<div class="smalltab_line"></div>
<div id="t1">
<br />

<table width="100%" border="0" cellspacing="0" cellpadding="0" class="mytable">
<?php
if(!empty($return)){
?>
  <tr>
    <td align="center">ID</td>
    <td align="center">名称</td>
    <td align="center">网址</td>
    <td align="center">排序</td>
    <td align="center">编辑</td>
    <td align="center">删除</td>
  </tr>
<?php 
foreach($return[0] as $k=>$v){
?>
  <tr>
    <td align="center"><?php echo $v['id']; ?></td>
    <td align="center"><?php echo $v['name']; ?></td>
    <td align="center"><?php echo $v['url'];?></td>
    <td align="center"><?php echo $v['mysort'];?></td>
    <td align="center"><a href="<?php echo url('flink','mod','id='.$v['id']);?>" class="example1"><img src="<?php echo PROJECT_IMG_URL;?>bianji.gif" alt="" /></a></td>
    <td align="center"><a href="<?php echo url('flink','del','id='.$v['id']);?>" onclick="return confirm('确定要删除么？');"><img src="<?php echo PROJECT_IMG_URL;?>shanchu.gif" alt="" /></a></td>
  </tr>
<?php
}
?>
  <tr>
    <td colspan="6" align="center"><?php echo $return[1];?></td>
  </tr>
  <?php
}else{
?>

  <tr>
    <td colspan="6" align="center">无内容！<a href="<?php echo url('flink','mylist');?>">返回列表</a></td>
    </tr>
<?php
}
?>
</table>

</div>
</body>
</html>